package cn.lysj.framework.common.validate.validate;


import cn.lysj.framework.common.validate.annotation.NotEmpty;
import cn.lysj.framework.common.validate.entity.Entity;

public class NotEmptyValidate extends AbstractValidate<NotEmpty> {

    public boolean validate(Entity entity) {
        return null != entity.getValue() && !"".equals(entity.getValue());
    }

    public void init() {
        this.setMsg(annotation.message());
        this.setGroups(annotation.groups());
    }
}
